#!/bin/bash
sudo yum install -y ruby ruby-devel lua lua-devel luajit \
    luajit-devel ctags git python python-devel \
    python3 python3-devel tcl-devel \
    perl perl-devel perl-ExtUtils-ParseXS \
    perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
    perl-ExtUtils-Embed libX11-devel

#  "--with-python-config-dir=" is deprecated
#  To avoid +python3/dyn , --enable-python3interp and --enable-pythoninterp ,please choose only one!!
#      https://blog.csdn.net/Kardiyal/article/details/85383231    
#      https://vi.stackexchange.com/questions/17433/requires-vim-compiled-with-python-2-7-1-or-3-4-support

tar zxvf vim-8.1.1516.tar.gz

cd vim-8.1.1516

./configure --with-features=huge \
    --enable-python3interp \
    --enable-rubyinterp \
    --enable-luainterp \
    --enable-perlinterp \
    --enable-multibyte \
    --enable-cscope \
    --enable-fontset --enable-xim \
    --enable-gui=gnome2
#    --prefix=

make && sudo make install
